<%-- 
    Document   : paziente
    Created on : 7-dic-2011, 13.08.07
    Author     : sestari
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <f:view>
        <head>
            <link rel="stylesheet" type="text/css" href="../style_generale.css" />
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />           
            <f:loadBundle basename="message.message" var="msg"/>        
            <title> <h:outputText value="#{msg.paginavisualizap}"/> </title>
        </head> 
        <body>
            <a4j:form>
                <rich:dataTable value="#{beanMedico.getPazientiAll()}" var="listaPazienti"
                                style="overflow:auto; width:100%; height:50px"
                                rows="8" footerClass="ordersHeader"
                                styleClass="orders"  headerClass="ordersHeader" columnClasses="evenColumn,oddColumn"> 

                    <rich:column sortBy="#{listaPazienti.nome}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.nome}"/>
                        </f:facet>
                        <h:outputText value="#{listaPazienti.nome}"/> 
                    </rich:column>

                    <rich:column sortBy="#{listaPazienti.cognome}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.cognome}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.cognome}"/> 
                    </rich:column>

                    <rich:column sortBy="#{listaPazienti.data_nascita}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.data_nascita}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.data_nascita}"> 
                            <f:convertDateTime type="date" dateStyle="short"/>
                        </h:outputText>
                    </rich:column>

                    <rich:column sortBy="#{listaPazienti.sesso}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.sesso}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.sesso}"/> 
                    </rich:column>

                    <rich:column sortBy="#{listaPazienti.luogo_nascita}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.luogo_nascita}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.luogo_nascita}"/> 
                    </rich:column> 

                    <rich:column sortBy="#{listaPazienti.indirizzo}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.indirizzo}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.indirizzo}"/> 
                    </rich:column> 

                    <rich:column sortBy="#{listaPazienti.cap}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.cap}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.cap}"/> 
                    </rich:column> 

                    <rich:column sortBy="#{listaPazienti.e_mail}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.e_mail}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.e_mail}"/> 
                    </rich:column> 

                    <rich:column sortBy="#{listaPazienti.cellulare}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.cellulare}"/> 
                        </f:facet>
                        <h:outputText value="#{listaPazienti.cellulare}"/> 
                    </rich:column> 

                    <rich:column sortBy="#{listaPazienti.foto}">
                        <f:facet name="header">
                            <h:outputText value="#{msg.foto}"/> 
                        </f:facet>                              
                        <h:graphicImage value="#{listaPazienti.foto}" width="50"/>                                                
                    </rich:column>

                    <f:facet name="footer">
                        <rich:datascroller id="listaPazienti"  selectedStyleClass="myList"></rich:datascroller>
                    </f:facet>
                </rich:dataTable> 
            </a4j:form>

            <h:form>
                <h:commandButton value="#{msg.back}" action="back" styleClass="button"/>                
            </h:form>
            <br>
            <br>
            <br>
            <%@ include file="/lingua/lingua.jsp" %>
        </body>
    </body>
</f:view>
</html>